/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controller;

import entity.SystemM;
import java.util.List;
import javax.swing.JTextField;

/**
 *
 * @author ian
 */
public class ActualDataControl {

   public ActualDataControl(JTextField Temperature, JTextField AtmPressure, JTextField Pluviosity) {
        List<SystemM> SystemControl = view.CentralFrame.Registers;
        if(!SystemControl.isEmpty()){
        Temperature.setText(Float.toString(SystemControl.get(SystemControl.size()-1).getTemperature())) ;
        AtmPressure.setText(Float.toString(SystemControl.get(SystemControl.size()-1).getAtmPressure())) ;
        Pluviosity.setText(Float.toString(SystemControl.get(SystemControl.size()-1).getPluviosity())) ;
        }else{
            Temperature.setText("0.0");
            AtmPressure.setText("0.0");
            Pluviosity.setText("0.0");
        }
        } 
    
}
